<template>
  <el-row>
    <el-col :span="24">
      <el-carousel trigger="click" :height="height">
        <el-carousel-item v-for="(item,index) in bannerList" :key="index">
            <img :src="item" alt="..." />
        </el-carousel-item>
      </el-carousel>
    </el-col>
  </el-row>
</template>

<script>
    export default {
        name: "CarouselComponent",
      props:{
        height: {
          type: String,
          default:'500px'
        },
        bannerList: {
          type: Array,
          // 对象或数组默认值必须从一个工厂函数获取
          default: function () {
            return ['../../../static/images/banner_home.jpg','../../../static/images/banner_home.jpg','../../../static/images/banner_home.jpg']
          }
        },

      },
      data(){
          return{

          }
      }
    }
</script>

<style scoped>
</style>
